package net.wangds.imagecomp.helper;

public final class ImageBase64Utils {

    public static final String KEYWORD_B64 = "base64,";

    public static String imageB64StrCutContent(String img){
        //data:image/jpeg;base64,
        StringBuffer sb = new StringBuffer(img);

        int idx = sb.indexOf(KEYWORD_B64);
        if(idx>0) {
            int len = KEYWORD_B64.length();
            sb.delete(0,idx+len);
            return sb.toString();
        }
        return "";
    }

}
